package com.ruoyi.qsng.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.qsng.mapper.TMessagePushMapper;
import com.ruoyi.qsng.service.ITMessagePushService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.domain.TMessagePush;

/**
 * 消息推送Service业务层处理
 * 
 * @author gk
 * @date 2023-08-14
 */
@Service
public class TMessagePushServiceImpl implements ITMessagePushService
{
    @Autowired
    private TMessagePushMapper tMessagePushMapper;

    /**
     * 查询消息推送
     * 
     * @param id 消息推送主键
     * @return 消息推送
     */
    @Override
    public TMessagePush selectTMessagePushById(Long id)
    {
        return tMessagePushMapper.selectTMessagePushById(id);
    }

    /**
     * 查询消息推送列表
     * 
     * @param tMessagePush 消息推送
     * @return 消息推送
     */
    @Override
    public List<TMessagePush> selectTMessagePushList(TMessagePush tMessagePush)
    {
        return tMessagePushMapper.selectTMessagePushList(tMessagePush);
    }

    /**
     * 新增消息推送
     * 
     * @param tMessagePush 消息推送
     * @return 结果
     */
    @Override
    public int insertTMessagePush(TMessagePush tMessagePush)
    {
        tMessagePush.setCreateTime(DateUtils.getNowDate());
        return tMessagePushMapper.insertTMessagePush(tMessagePush);
    }

    /**
     * 修改消息推送
     * 
     * @param tMessagePush 消息推送
     * @return 结果
     */
    @Override
    public int updateTMessagePush(TMessagePush tMessagePush)
    {
        tMessagePush.setUpdateTime(DateUtils.getNowDate());
        return tMessagePushMapper.updateTMessagePush(tMessagePush);
    }

    /**
     * 批量删除消息推送
     * 
     * @param ids 需要删除的消息推送主键
     * @return 结果
     */
    @Override
    public int deleteTMessagePushByIds(Long[] ids)
    {
        return tMessagePushMapper.deleteTMessagePushByIds(ids);
    }

    /**
     * 删除消息推送信息
     * 
     * @param id 消息推送主键
     * @return 结果
     */
    @Override
    public int deleteTMessagePushById(Long id)
    {
        return tMessagePushMapper.deleteTMessagePushById(id);
    }
}
